import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:kkhousekeep/page/home/convenient/notice/notice_detail_controller.dart';

import '../../../../widget/custom_app_bar.dart';

class NoticeDetailPage extends StatelessWidget {
  const NoticeDetailPage({super.key});

  @override
  Widget build(BuildContext context) {
    return GetBuilder<NoticeDetailController>(
      init: NoticeDetailController(),
      builder: (controller) => Obx(
        () => Scaffold(
          appBar: CustomAppBar(
            controller.title.value,
            isCenterTitle: false,
          ),
          body: Container(
            padding: EdgeInsets.only(top: 16.h),
            color: const Color(0xFFf4f5f6),
            child: SafeArea(
              left: false,
              right: false,
              child: Container(
                constraints: const BoxConstraints.expand(),
                color: Colors.white,
                child: SingleChildScrollView(
                  child: Html(
                    data: controller.content.value,
                  ),
                ),
              ),
            ),
          ),
        ),
      ),
    );
  }
}
